<%-- 
    Document   : approveuser
    Created on : May 22, 2012, 11:34:54 AM
    Author     : Jayson Kiong
--%>

<%@page import="Model.User"%>
<%@page import="java.util.ArrayList"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
        <link rel = "stylesheet" type = "text/css" href = "quicklendstyle.css"/>
        <script src="gen_validatorv4.js" type="text/javascript"></script>
        <script type="text/javascript" src="quicklendjs.js"></script>
    </head>
    <body>
        <%ArrayList ar = (ArrayList)session.getAttribute("userlist");
          int arctr = 0;
          User user = new User();
          int arsize = ar.size(); 
        %>
        <div id="contenttitle" style="position: absolute; top:13px; left:25px;">
            Approve User
        </div>
        <form id="approveuserform" action="UpdateUserStatus" method="POST">
            <table id="editcontent"style="position:absolute; top:70px; left:30px; filter:alpha(opacity=100)">
                <tr>
                    <td>Name:</td><td><select name="username" style="width:160px;height:25px;" onchange="updateUserID()">
                    
                                        <%arctr=0;
                                        for(int x=0;x<arsize;x++){
                                        user=(User)ar.get(arctr);%>
                                        <option value="<%=user.getStrFirstname()+" "+user.getStrMiddlename()+" "+user.getStrLastname()%>"><%=user.getStrFirstname()+" "+user.getStrMiddlename()+" "+user.getStrLastname()%></option>
                                        <%arctr++;}%>
                                    </select><%user = (User)ar.get(0);%><input type="text" hidden name="userID" value="<%=user.getiUserid()%>"/> </td>
                </tr>
                <tr>
                    <td><br><input type="submit" value="Approve"/></td>
                </tr>
                <tr>
                    <select name="hiddenuserid" style="display:none;">
                                        <%arctr=0;
                                        for(int x=0;x<arsize;x++){
                                        user=(User)ar.get(arctr);%>
                                        <option value="<%=user.getiUserid()%>"><%=user.getiUserid()%></option> 
                                        <%arctr++;}%>
                    </select>
                </tr>
            </table>
        </form>
    </body>
</html>
